.class Lcom/example/m6wmr/SearchActivity$10;
.super Ljava/lang/Thread;
.source "SearchActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/SearchActivity;->getgoodsSource()Ljava/util/List;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/SearchActivity;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/SearchActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/SearchActivity$10;->this$0:Lcom/example/m6wmr/SearchActivity;

    .line 688
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 11

    .prologue
    const/4 v10, 0x1

    .line 690
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 693
    new-instance v5, Landroid/os/Message;

    invoke-direct {v5}, Landroid/os/Message;-><init>()V

    .line 694
    .local v5, "msg":Landroid/os/Message;
    new-instance v8, Ljava/lang/StringBuilder;

    iget-object v9, p0, Lcom/example/m6wmr/SearchActivity$10;->this$0:Lcom/example/m6wmr/SearchActivity;

    iget-object v9, v9, Lcom/example/m6wmr/SearchActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v9}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v9

    invoke-static {v9}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "/index.php?ctrl=app&source=1&action=searchhotkey&datatype=json"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 695
    .local v7, "url":Ljava/lang/String;
    iget-object v8, p0, Lcom/example/m6wmr/SearchActivity$10;->this$0:Lcom/example/m6wmr/SearchActivity;

    iget-object v8, v8, Lcom/example/m6wmr/SearchActivity;->m:Lmyapp/MyApp;

    invoke-static {v7, v8}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v6

    .line 697
    .local v6, "str":Ljava/lang/String;
    :try_start_0
    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3, v6}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 699
    .local v3, "json":Lorg/json/JSONObject;
    const-string v8, "error"

    invoke-virtual {v3, v8}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    const-string v9, "true"

    invoke-virtual {v8, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    if-eqz v8, :cond_0

    .line 700
    invoke-static {}, Lmyapp/Util;->dismisDialog()V

    .line 702
    const-string v8, "msg"

    invoke-virtual {v3, v8}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    iput-object v8, v5, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 703
    const/4 v8, 0x1

    iput v8, v5, Landroid/os/Message;->arg1:I

    .line 704
    iget-object v8, p0, Lcom/example/m6wmr/SearchActivity$10;->this$0:Lcom/example/m6wmr/SearchActivity;

    iget-object v8, v8, Lcom/example/m6wmr/SearchActivity;->h:Landroid/os/Handler;

    invoke-virtual {v8, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 738
    .end local v3    # "json":Lorg/json/JSONObject;
    :goto_0
    return-void

    .line 707
    .restart local v3    # "json":Lorg/json/JSONObject;
    :cond_0
    const-string v8, "msg"

    invoke-virtual {v3, v8}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v8

    if-eqz v8, :cond_1

    .line 708
    invoke-static {}, Lmyapp/Util;->dismisDialog()V

    .line 709
    const/4 v8, 0x2

    iput v8, v5, Landroid/os/Message;->arg1:I

    .line 710
    iget-object v8, p0, Lcom/example/m6wmr/SearchActivity$10;->this$0:Lcom/example/m6wmr/SearchActivity;

    iget-object v8, v8, Lcom/example/m6wmr/SearchActivity;->h:Landroid/os/Handler;

    invoke-virtual {v8, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 730
    .end local v3    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v0

    .line 732
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 733
    invoke-static {}, Lmyapp/Util;->dismisDialog()V

    .line 735
    const/4 v8, 0x4

    iput v8, v5, Landroid/os/Message;->arg1:I

    .line 736
    iget-object v8, p0, Lcom/example/m6wmr/SearchActivity$10;->this$0:Lcom/example/m6wmr/SearchActivity;

    iget-object v8, v8, Lcom/example/m6wmr/SearchActivity;->h:Landroid/os/Handler;

    invoke-virtual {v8, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 713
    .end local v0    # "e":Lorg/json/JSONException;
    .restart local v3    # "json":Lorg/json/JSONObject;
    :cond_1
    :try_start_1
    const-string v8, "msg"

    invoke-virtual {v3, v8}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v2

    .line 714
    .local v2, "jarray":Lorg/json/JSONArray;
    invoke-virtual {v2}, Lorg/json/JSONArray;->length()I

    move-result v8

    if-ge v8, v10, :cond_2

    .line 715
    const/4 v8, 0x7

    iput v8, v5, Landroid/os/Message;->arg1:I

    .line 716
    iget-object v8, p0, Lcom/example/m6wmr/SearchActivity$10;->this$0:Lcom/example/m6wmr/SearchActivity;

    iget-object v8, v8, Lcom/example/m6wmr/SearchActivity;->h:Landroid/os/Handler;

    invoke-virtual {v8, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 717
    invoke-static {}, Lmyapp/Util;->dismisDialog()V

    goto :goto_0

    .line 720
    :cond_2
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_1
    invoke-virtual {v2}, Lorg/json/JSONArray;->length()I

    move-result v8

    if-lt v1, v8, :cond_3

    .line 727
    invoke-static {}, Lmyapp/Util;->dismisDialog()V

    .line 728
    const/4 v8, 0x5

    iput v8, v5, Landroid/os/Message;->arg1:I

    .line 729
    iget-object v8, p0, Lcom/example/m6wmr/SearchActivity$10;->this$0:Lcom/example/m6wmr/SearchActivity;

    iget-object v8, v8, Lcom/example/m6wmr/SearchActivity;->h:Landroid/os/Handler;

    invoke-virtual {v8, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 722
    :cond_3
    new-instance v4, Ljava/util/HashMap;

    invoke-direct {v4}, Ljava/util/HashMap;-><init>()V

    .line 723
    .local v4, "map":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v8, "text"

    invoke-virtual {v2, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v9

    .line 724
    const-string v10, "name"

    invoke-virtual {v9, v10}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    .line 723
    invoke-interface {v4, v8, v9}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 725
    iget-object v8, p0, Lcom/example/m6wmr/SearchActivity$10;->this$0:Lcom/example/m6wmr/SearchActivity;

    # getter for: Lcom/example/m6wmr/SearchActivity;->data_list:Ljava/util/List;
    invoke-static {v8}, Lcom/example/m6wmr/SearchActivity;->access$21(Lcom/example/m6wmr/SearchActivity;)Ljava/util/List;

    move-result-object v8

    invoke-interface {v8, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    .line 720
    add-int/lit8 v1, v1, 0x1

    goto :goto_1
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 741
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 742
    monitor-exit p0

    return-void

    .line 741
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
